package com.jhgk.jhcee.forecast.controller;

import com.github.pagehelper.PageInfo;
import com.jhgk.jhcee.bfk.model.MPreMajorScoreZjbExport;
import com.jhgk.jhcee.common.resultful.BasisResultful;
import com.jhgk.jhcee.common.resultful.PageResultful;
import com.jhgk.jhcee.forecast.domain.model.MPreMajorScoreZjbExportMode;
import com.jhgk.jhcee.forecast.service.MPreMajorScoreZjbExportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author: xiezhongping
 * @description:
 * @date: 2021/8/10 16:01.
 */
@RestController
@RequestMapping("/MajorRecruit")
@Api(value = "专业预测数据发布导出",tags = {"专业预测数据发布导出"})
public class MPreMajorScoreZjbExportController {

    @Resource(name = "MPreMajorScoreZjbExportServiceImpl")
    MPreMajorScoreZjbExportService mPreMajorScoreZjbExportService;

    @GetMapping("/searchTotal")
    @ApiOperation("查询专业预测记录数")
    public BasisResultful<Object> searchTotal(@RequestParam("provinceUuid")String provinceUuid,@RequestParam("year")Integer year) {
        return mPreMajorScoreZjbExportService.searchTotal(provinceUuid,year);
    }

    @PostMapping("/searchAllPage")
    @ApiOperation("分页查询专业预测记录")
    public PageResultful<PageInfo<MPreMajorScoreZjbExport>> searchAllPage(@RequestBody @Validated MPreMajorScoreZjbExportMode mPreMajorScoreZjbExportMode) {
        return mPreMajorScoreZjbExportService.searchAllPage(mPreMajorScoreZjbExportMode);
    }
}
